package com.mask.demo.service.impl;

import com.mask.demo.dao.UserDao;
import com.mask.demo.dao.impl.UserDaoImpl;
import com.mask.demo.service.UserService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * ClassName UserServiceImpl
 * Create by hx
 * Date 2021/9/15 7:13 下午
 */

public class UserServiceImpl implements UserService {
    @Override
    public void hello() {
        ClassPathXmlApplicationContext app =
                new ClassPathXmlApplicationContext("applicationContext.xml");
        UserDao userDao = (UserDao) app.getBean("userDao");
        userDao.hello();
        System.out.println("userService say Hello Spring!");
    }
}
